package com.lhl.fw.db.biz.domain.entity;

import com.lhl.fw.db.entity.BaseEntity;
import com.lhl.fw.db.listener.MyEntityListener;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;

import javax.persistence.*;

@Entity
@Getter
@Setter
@NoArgsConstructor
@ToString
@EntityListeners(MyEntityListener.class)
public class Address extends BaseEntity<String> {

	private String city;
	private String street;
	@OneToOne(cascade=CascadeType.PERSIST,optional=false,fetch=FetchType.LAZY)
	@JoinColumn(name="P_ID")
	private Person person;
}
